package com.fowo.api.sys.controller;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.fowo.api.common.model.R;
import com.fowo.api.sys.entity.SysTaskLog;
import com.fowo.api.sys.model.SysTaskLogSearch;
import com.fowo.api.sys.service.SysTaskLogService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@Tag(name = "系统任务日志")
@RestController
@RequestMapping("/api/sys/task/log")
public class SysTaskLogController {

    @Resource
    private SysTaskLogService sysTaskLogService;

    @GetMapping("page")
    @Operation(summary = "分页查询")
    public R<Page<SysTaskLog>> searchPage(SysTaskLogSearch search) {
        return R.data(sysTaskLogService.searchPage(search));
    }
}
